home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / util4 / blcnts35.lha / BlocNotes / scroller.rexx < prev    next >
OS/2 REXX Batch file  |  1996-01-10  |  2KB  |  80 lines

  1. /*Scroller.rexx*/
  2. IF POS('blocnotes.rexx' , SHOW('Ports'))=0 THEN do
  3.    say "Sorry, I need Blocnotes. Run it first"
  4.    exit
  5. end
  6.  
  7. /******************************************************************
  8.  Adjust these variables to fit in your system.
  9. ******************************************************************/
  10.  
  11. FontName='LetterGothic.font'          /*Font to use*/
  12. FontSize=60                           /*Size of the font*/
  13.  
  14. /*          These are for centering the window     */
  15. ScrWidth=800                          /*Width of the screen*/
  16. ScrHeight=600                         /*Heigth of the screen*/
  17.  
  18. /*****************************************************************/
  19.  
  20.  
  21. WindWidth=FontSize*5
  22. WindHeight=FontSize+5
  23. Speed=3
  24.  
  25. address 'blocnotes.rexx'
  26. options results
  27.  
  28. forever=0
  29.  
  30. if words(Arg(1))<2 then do
  31.    if Arg(1)='?' then do
  32.       say 'USAGE: rx Scroller <times> <string>'
  33.       say 'Maximum length is 70 chars.'
  34.    end
  35.    times=3
  36.    string='USAGE: rx Scroller.rexx <times> <string>.Press a key.'
  37. end
  38. else do
  39.    times=word(arg(1),1)
  40.    if times=0 then forever=1
  41.    if (times=0)|(times>40) then times=2
  42.  
  43.    p=POS(' ',Arg(1))
  44.    string=RIGHT(Arg(1),LENGTH(Arg(1))-p)
  45.    if LENGTH(string)>70 then do
  46.       string=left(string,70);
  47.    end
  48. end
  49.  
  50. OPEN (ScrWidth-WindWidth)/2 (ScrHeight-WindHeight)/3 WindWidth WindHeight FontName FontSize 3
  51. id=result
  52.  
  53. SETINSTIME Speed
  54. EDIT id OFF
  55. WORDWRAP id OFF
  56. INHIBIT id ON
  57. ONCLICK EXIT
  58. AA=0
  59.  
  60. do i=0 to times-1
  61.    CLEAR id
  62.    GO id 1 0
  63.    GO id 10 0
  64.    PRINT id '        '
  65.    if AA=0 then do
  66.       SHOW id
  67.       AA=1
  68.    end
  69.    WASCLICKED id
  70.    if result='1' then break
  71.    PRINT id string
  72.    WASCLICKED id
  73.    if result='1' then break
  74.    PRINT id '           '
  75.    WASCLICKED id
  76.    if result='1' then break
  77.    if forever=1 then i=0
  78. end
  79. CLOSE id
  80.